
<template>
  <div v-clickoutside="handleClickOutSide">1111111</div>
</template>

<script>
  import clickoutside from '../../directive/clickoutside';
  export default {
    methods: {
      handleClickOutSide(e) {
        // 当外部被点击时调用
        console.log('点击了外部');
      }
    },
    directives: {
      clickoutside
    }
  }
</script>